package com.zl.spring.di.service.impl;/**
 * @author suke
 * @create 2021-07-30 13:52
 */

import com.zl.spring.di.dao.UserDao;
import com.zl.spring.di.dao.impl.UserDaoImpl;
import com.zl.spring.di.service.UserService;

/**
 * TODO
 * @ClassName: UserServiceImpl
 * @author: suke
 * @since: 2021/7/30 13:52
 */
public class UserServiceImpl implements UserService {
    private UserDao userDao;   //可读属性,  提供get方法    可写属性:  提供set方法

    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }

    @Override
    public void register() {
        userDao.addUser();
    }

    @Override
    public void delete() {
        userDao.deleteById(1);

    }

    public UserServiceImpl() {
        System.out.println("我是无参构造方法");
    }
}
